package com.company.demo.factory_pattern;

import com.company.demo.TestInterface;

public class StrategyFactoryTest implements TestInterface {
    @Override
    public void run() {
        System.out.println("策略工厂");
        StrategyFactory strategyFactory = new StrategyFactory();
        strategyFactory.setOperater("-");
        double resule = strategyFactory.getResule(1, 2);
        System.out.println("1-2=" + resule);

    }
}
